#!/usr/bin/env python
# coding=utf-8


def flag():
    flag = 1835996258
    for s in range(2, 100):
        if 2 * s % 3 == 0: flag = check1(flag)
        if 2 * s % 3 == 1: flag = check2(flag, s-1)
        if 2 * s % 3 == 2: flag = check3(flag)
    print(flag)

def check1(input_num):
    return input_num - 4950

def check2(input_num, s):
    if s % 2 == 0:
        return input_num - 499500
    else:
        return input_num + 499500

def check3(input_num):
    return input_num - 49995000


if __name__ == '__main__':
    flag()
